<!-- 
Template Name: Metronic - Responsive Admin Dashboard Template build with Twitter Bootstrap 3.1.1
Version: 2.0.2
Author: KeenThemes
Website: http://www.keenthemes.com/
Contact: support@keenthemes.com
Purchase: http://themeforest.net/item/metronic-responsive-admin-dashboard-template/4021469?ref=keenthemes
License: You must have a valid license purchased only from themeforest(the above link) in order to legally use the theme for your project.
-->
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<!--<![endif]-->
<!-- BEGIN HEAD -->
<!-- BEGIN BODY -->
<style type="text/css">
	.star-color{ color: #ff0000; }
	textarea{ resize: none; }
</style>
<div class="page-header-fixed" ng-controller="pushController">
<!-- BEGIN CONTAINER -->
	<!-- BEGIN CONTENT -->
		<!--表格操作按钮组-->
		<div class="tabbable tabbable-custom boxless">
			<ul class="nav nav-tabs">
				<li class="active">
					<!--<a href="#bootbox" data-toggle="tab">TAB1</a>-->
					<a data-toggle="tab">推送管理</a>
				</li>
			</ul>
			<div class="tab-content"></div>
		</div>
		<div class="form-group row">
			<!--参数：this必填项；subjectModel1弹出框ID；test1点击修改框执行的代码-->
			<div class="col-sm-2">
				<a class="btn blue" ng-click="addPushMessage();"><i class="fa fa-plus"></i>新增</a>
				<!--<a class="btn blue" ng-click="shanchu()")><i class="fa fa-trash-o"></i>删除</a>-->
			</div>
			<!--<div class="col-sm-3">
				<label class="col-sm-3 control-label text-right">筛选</label>
				<div class="col-sm-9"><input type="text" ng-model="texts" class="form-control"/></div>
			</div>-->
		</div>
		<!--表格头部刷选条件-->
		<hr/>
		<table class="table table-striped table-bordered table-hover" id="table_1">
			<thead>
				<tr>
					<th>标题</th>
					<th>内容</th>
					<th>创建时间</th>
					<th>推送消息范围</th>
					<th>推送用户范围</th>
					<th>推送系统端</th>
					<th>推送消息类型</th>
					<th>消息状态</th>
					<th>推送时间</th>
					<th>推送操作员</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				<tr ng-repeat="pushList in pushList" pg-loaded="{{$last}}" target-table="table_1">
											<td width="200">
												<span ng-bind="pushList.title"></span>
											</td>
											<td width="200">
												<span ng-bind="pushList.content"></span>
											</td>
											<td>
												<span ng-bind="pushList.editDate"></span>
											</td>
											<td>
												<span>
													{{pushList.scope}}
													<!--{{pushList.scope | getValueInStaticFilter : 'scopeStatusArray' }}-->
												</span>
											</td>
											<td>
												<span>
													{{pushList.pushOperator}}
													<!--{{pushList.pushOperator | getValueInStaticFilter : 'merchantCodeArray' }}-->
												</span>
											</td>
											<td>
												<span>
													{{pushList.sysCode}}
													<!--{{pushList.sysCode | getValueInStaticFilter : 'sysCodeStatusArray' }}-->
												</span>
											</td>
											<td>
												<span>
													{{pushList.messageType}}
													<!--{{pushList.messageType | getValueInStaticFilter : 'messageTypeArray' }}-->
												</span>
											</td>
											<td>
												<span>
													{{pushList.state}}
													<!--{{pushList.state | getValueInStaticFilter : 'messageStatusArray' }}-->
												</span>
			
											</td>
											<td>
												<span ng-bind="pushList.pushDate"></span>

											</td>
											<td>
												<span ng-bind="pushList.pushUserId"></span>

											</td>
											<td width="120">
												<a class="btn" data-target="#" href="javascript:" ng-click="queryPushMessage(pushList.pushId)">查看</a>
												<a  ng-if="pushList.state=='2'" class="btn" data-target="#" href="index.html#/pushDetail/{{pushList.pushId}}">推送</a>
												<a class="btn" href="javascript:" ng-click="deleteMessage(pushList.pushId)">删除</a>
											</td>
										</tr>
			</tbody>
		</table>
		<div class="ngPaper">
	     <ngpaper  page-count="pageCount" current-page="currentPage" on-page-change="onPageChange()" first-text="首页" next-text="下一页" prev-text="上一页" last-text="尾页"></ngpaper>
    	</div>
<div id="subjectModel1" class="modal fade" role="dialog" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
				<h4 class="modal-title">添加新的推送</h4>
			</div>
		
			<div class="modal-body form">
				<div class="form-group">
					<div class="row">
						<label class="col-sm-3 control-label text-right"><i class="star-color">*</i> 标题</label>
						<div class="col-sm-9">
							<div class="input-group">
							<input type="text" placeholder="请输入推送消息标题" class="form-control" maxlength="15" ng-model="add_title" />
							</div>
						</div>
					</div>
					<div class="row">
						<label class="col-sm-3 control-label text-right"><i class="star-color">*</i> 内容</label>
						<div class="col-sm-9">
							<div class="input-group">
							<textarea placeholder="请输入推送消息内容" class="form-control" ng-model="add_content"></textarea>
							</div>
						</div>
					</div>
					<div class="row">
						<label class="col-sm-3 control-label text-right">消息类型</label>
						<div class="col-sm-9">
							<div class="input-group">
								<select ng-model="add_messageType" class="form-control validInput">
									<option value="1">普通消息推送</option>
									<option value="2">系统更新推送</option>
									<option value="3">活动推送</option>
								</select>
							</div>
						</div>
					</div>
					<div class="row">
						<label class="col-sm-3 control-label text-right">推送系统端</label>
						<div class="col-sm-9">
							<div class="input-group">
							<select ng-model="add_sysCode" class="form-control validInput">
									<option value="1">所有客户端</option>
									<!--<option value="2">app端</option>-->
									<!--<option value="3">微信端</option>-->
								</select>
							</div>
						</div>
					</div>
					<div class="row">
						<label class="col-sm-3 control-label text-right">消息范围</label>
						<div class="col-sm-9">
							<div class="input-group">
							<select ng-model="add_scope" class="form-control validInput">
										<option value="1">所有用户</option>
										<!--<option value="2">所有在线用户</option>
										<option value="3">注册3个月用户</option>
										<option value="4">其他自定义条件用户</option>-->
									</select>
							</div>
						</div>
					</div>
					<div class="row" ng-show="add_scope=='4'">
						<label class="col-sm-3 control-label text-right">注册时间</label>
						<div class="col-sm-9">
							<div class="input-group">
							<input class="form-control width47 getTime validInput"  type="text" ng-readonly="true"
						            ng-model="add_regStartDate" ng-change="dateIsChange=false"/>~
						            	<input class="form-control width47 getTime validInput"  type="text" ng-readonly="true"
						            ng-model="add_regEndDate" ng-change="dateIsChange=false"/>
							</div>
						</div>
					</div>
					<div class="row" ng-show="add_scope=='4'">
						<label class="col-sm-3 control-label text-right">用户性别</label>
						<div class="col-sm-9">
							<div class="input-group">
							<input class="validInput" checked=""  type="radio"
						            ng-model="add_accountSex" value="1" />全部 
						            	<input class="validInput"  type="radio"
						            ng-model="add_accountSex" value="2" />男 
						            <input class="validInput"  type="radio"
						            ng-model="add_accountSex" value="3" />女 
							</div>
						</div>
					</div>
					<div class="row">
						<label class="col-sm-3 control-label text-right">用户范围</label>
						<div class="col-sm-9">
							<div class="input-group">
							<select ng-model="add_pushOperator" class="form-control validInput">
										<option value="2">所有运营商</option>
										<!--<option value="1">电桩用户</option>
										<option value="3">华体用户</option>-->
									</select>
							</div>
						</div>
					</div>
					<div class="row">
						<label class="col-sm-3 control-label text-right">用户范围</label>
						<div class="col-sm-9">
							<div class="input-group">
							<select ng-model="add_state" class="form-control validInput">
										<option value="1">及时推送</option>
										<!--<option value="3">延时推送</option>
										<option value="2">草稿</option>-->
									</select>
							</div>
						</div>
					</div>
					<div class="row" ng-show="add_state=='3'">
						<label class="col-sm-3 control-label text-right">延时推送时间</label>
						<div class="col-sm-9">
							<div class="input-group">
							<input class="form-control getTime validInput"  type="text" ng-readonly="true"
                    ng-model="add_delayDate" ng-change="dateIsChange=false"/>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-danger" data-dismiss="modal" ng-click="validReset();"><i class="fa fa-times"></i>关闭</button>
				<button type="button" class="btn btn-primary" ng-click="submitPushMessage();"><i class="fa fa-check"></i>保存并推送</button>
			</div>
		</div>
	</div>
</div>	
<!--查看消息详情-->
<div id="subjectModel2" class="modal fade" role="dialog" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
				<h4 class="modal-title">查看推送消息详情</h4>
			</div>
		
			<div class="modal-body form">
				<div class="form-group">
					<div class="row">
						<label class="col-sm-3 control-label text-right">标题：</label>
						<div class="col-sm-9">
							<div class="input-group">
							<span class="span_detail" ng-bind="pushDetail.title"></span>
							</div>
						</div>
					</div>
					<div class="row">
						<label class="col-sm-3 control-label text-right">消息编写时间：</label>
						<div class="col-sm-9">
							<div class="input-group">
							<span class="span_detail" ng-bind="pushDetail.edit_date"></span>
							</div>
						</div>
					</div>
					<div class="row">
						<label class="col-sm-3 control-label text-right">内容：</label>
						<div class="col-sm-9">
							<div class="input-group">
							<span class="span_detail" ng-bind="pushDetail.content"></span>
							</div>
						</div>
					</div>
					<div class="row">
						<label class="col-sm-3 control-label text-right">消息类型：</label>
						<div class="col-sm-9">
							<div class="input-group">
								<span class="span_detail">
									{{pushDetail.message_type}}
								<!--{{pushDetail.message_type | getValueInStaticFilter : 'messageTypeArray'}}-->
								</span>
							</div>
						</div>
					</div>
					<div class="row">
						<label class="col-sm-3 control-label text-right">推送系统端：</label>
						<div class="col-sm-9">
							<div class="input-group">
							<span class="span_detail">
								{{pushDetail.sys_code}}
							<!--{{pushDetail.sys_code | getValueInStaticFilter :'sysCodeStatusArray' }}-->
							</span>
							</div>
						</div>
					</div>
					<div class="row">
						<label class="col-sm-3 control-label text-right">消息范围：</label>
						<div class="col-sm-9">
							<div class="input-group">
							<span class="span_detail">
								{{pushDetail.scope}}
							<!--{{pushDetail.scope | getValueInStaticFilter : 'scopeStatusArray'}}-->
							</span>
							</div>
						</div>
					</div>
					<div class="row" ng-if="pushDetail.scope=='4'">
						<label class="col-sm-3 control-label text-right">注册时间：</label>
						<div class="col-sm-9">
							<div class="input-group">
							<span class="span_detail" ng-if="!!pushDetail.reg_start_date">
						        		{{pushDetail.reg_start_date}}~
						        		{{pushDetail.reg_end_date}}
						        	</span>
							</div>
						</div>
					</div>
					<div class="row" ng-if="pushDetail.scope=='4'">
						<label class="col-sm-3 control-label text-right">用户性别：</label>
						<div class="col-sm-9">
							<div class="input-group">
							<span class="span_detail" ng-if="!!pushDetail.account_sex">
								{{pushDetail.account_sex}}
						        		<!--{{pushDetail.account_sex | getValueInStaticFilter : 'accountSexArray' }}-->
						        	</span>
							</div>
						</div>
					</div>
					<div class="row">
						<label class="col-sm-3 control-label text-right">用户范围：</label>
						<div class="col-sm-9">
							<div class="input-group">
							<span class="span_detail">
								{{pushDetail.push_operator}}
							<!--{{pushDetail.push_operator | getValueInStaticFilter : 'merchantCodeArray' }}-->
							</span>
							</div>
						</div>
					</div>
					<div class="row">
						<label class="col-sm-3 control-label text-right">消息状态：</label>
						<div class="col-sm-9">
							<div class="input-group">
							<span class="span_detail">
								{{pushDetail.state}}
							<!--{{pushDetail.state | getValueInStaticFilter : 'messageStatusArray'}}-->
							</span>
						        <a class="btn" href="javascript:;" ng-click="pushMessage(pushDetail.pushId);" ng-if="pushDetail.state=='2'">推送：</a>
							</div>
						</div>
					</div>
					<div class="row" ng-show="add_state=='3'">
						<label class="col-sm-3 control-label text-right">推送时间：</label>
						<div class="col-sm-9">
							<div class="input-group">
							<span class="span_detail" ng-if="!!pushDetail.push_date" ng-bind="pushDetail.push_date"></span>
							</div>
						</div>
					</div>
					<div class="row" ng-if="pushDetail.state=='3'">
						<label class="col-sm-3 control-label text-right">延时推送时间：</label>
						<div class="col-sm-9">
							<div class="input-group">
							<span class="span_detail" ng-if="!!pushDetail.delayDate" ng-bind="pushDetail.delayDate"></span>
							</div>
						</div>
					</div>
					<div class="row">
						<label class="col-sm-3 control-label text-right">是否有效：</label>
						<div class="col-sm-9">
							<div class="input-group">
							<span class="span_detail" ng-if="pushDetail.valid_flag=='1'">有效</span>
							</div>
						</div>
					</div>
					<div class="row">
						<label class="col-sm-3 control-label text-right">操作员：</label>
						<div class="col-sm-9">
							<div class="input-group">
							<span class="span_detail" ng-bind="pushDetail.push_user_id"></span>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-danger" data-dismiss="modal"><i class="fa fa-times"></i>关闭</button>
			</div>
		</div>
	</div>
</div>	
</div>

<link rel="stylesheet" type="text/css" href="home/assets/plugins/layer/skin/layer.css" />

<script type="text/javascript" src="home/assets/plugins/layer/layer.js"></script>
<script src="home/assets/plugins/pagination/src/ng-pagination.js" type="text/javascript"/>
<link href="home/assets/plugins/pagination/src/ng-pagination.css" rel="stylesheet" />

